sinaSSOConfig = new function() {
	this.service = 'client';
	this.domain = 'sina.com.cn';
	this.noActiveTime = 14400;
	this.setDomain = true;
	this.crossDomain = true;
	this.customInit = function() {    };
	this.customLoginCallBack = function(result)
	{
		if(result["result"]==false)
		{
			if(result["errno"]==4049)
			{
				var url='https://login.sina.com.cn/signup/signin.php?';
				url+='entry=client';
				url+='&r='+window.location.href;
				url+='&username='+$("#user").val();
				url+='&retcode=4049';
				window.location.href=url+"&"+Math.random();
			}else{
				loginfail(result.reason);
			}
		}else{
			loginsuccess();
		}
	};
	this.customLogoutCallBack = function (result) {
		window.location.reload();
	};
};
function logintosina(username, password){
  var savetime = 30*24*3600;
  sinaSSOController.login(username, password, savetime);
} 
function loginoutsina(){
	sinaSSOController.logout();
}